Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.

Conversation

@vansangpfiev
Copy link
Contributor

@vansangpfiev vansangpfiev commented Apr 12, 2024

For model like nomic-embed-text-v1.5.f16.gguf, we skip warm up.
Also change the API to send_embedding for non-logits model.

} else {
const float* data = llama_get_embeddings(ctx);
std::vector<float> embedding(data, data + n_embd);
std::vector<float> embd_res(n_embd, 0.0f);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

API change here for non-logit model

@vansangpfiev vansangpfiev changed the title emb: test fix: embedding fixup for nomic-embed-text model Apr 15, 2024
@vansangpfiev vansangpfiev marked this pull request as ready for review April 15, 2024 09:49

params.n_gpu_layers = jsonBody->get("ngl", 100).asInt();
params.n_ctx = jsonBody->get("ctx_len", 2048).asInt();
is_embedded_model =
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use embedding flag to check if we should warm up model with embedding or not

@tikikun tikikun self-requested a review April 16, 2024 00:57
Copy link
Contributor

@tikikun tikikun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tikikun tikikun merged commit 7ae9928 into main Apr 16, 2024
@vansangpfiev vansangpfiev deleted the fix-embed branch July 8, 2024 05:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants